
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>员工</title>
    <%@include file="/static/js/common.jsp"%>
    <script>
        jQuery.ajaxSettings.traditional = true
        $(function () {
            //渲染表格数据
            $('#employee_dg').datagrid({
                url:'/systemLog/query.do',
                fitColumns:true,
                fit:true,
                pagination:true,
                toolbar:"#employee_tb",
                rownumbers:true,
                columns:[[
                    {field:'id',title:'编号',width:100},
                    {field:'opuserName',title:'操作人',width:100},
                    {field:'optime',title:'操作时间',width:100},
                    {field:'opip',title:'ip地址',width:100},
                    {field:'function',title:'操作方法',width:100},
                    {field:'params',title:'操作参数',width:100}

                ]]
            });
        })






        /*删除*/
        function deleteUser() {
            var tr = $('#employee_dg').datagrid("getSelections");

                //没有选中
                $.messager.alert('温馨提示',"亲,确认清空系统日志?",'info',function () {

                    $.get("/systemLog/delete.do",function (data) {
                        if (data.success) {
                            $.messager.alert('温馨提示','删除成功','info',function () {


                                $('#employee_dg').datagrid("reload");
                            });
                        }
                        else{
                            $.messager.alert('温馨提示',data.msg);


                        }
                    })
                });




        }
        /*刷新*/
        function reloadwin() {
            $('#employee_dg').datagrid("reload");
        }




    </script>
</head>
<body>
<table id="employee_dg"></table>
<div id="employee_tb" >

    <a class="easyui-linkbutton" onclick="deleteUser()" data-options="iconCls:'icon-remove',text:'清空日志'"></a>
    <a class="easyui-linkbutton" onclick="reloadwin()" data-options="iconCls:'icon-reload',text:'刷新'"></a>

</div>



</body>
</html>
